const express = require("express")
const path = require("path")
const app = express()

app.use(express.static(path.join(__dirname, "public")))

app.get("/get1", (req, res) => {
    res.send("hello ajax get")
})

app.get("/get2", (req, res) => {
    // get请求的参数放在哪里？
    console.log(req.query);
    res.send(`您已经注册成功，您的账号是${req.query.username},您的密码是${req.query.password}`)
})

let server = app.listen(3000, () =>{
    console.log("服务已经运行在3000端口");
})